-- GENERATED SPELL FOR [Westguard Cannoneer] --


function spell0_23839(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23839', 570, 1)
end

function Sorts_23839(pUnit, Event)
local choix_sorts_23839 = math.random(0, 0)
if choix_sorts_23839 == 0 then
pUnit:RegisterEvent('spell0_23839', 1, 1)
end
end

function mob23839_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23839', math.random(1500, 3000), 1)
end

function mob23839_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23839_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23839_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23839, 1, 'mob23839_Action')
RegisterUnitEvent(23839, 2, 'mob23839_Leave')
RegisterUnitEvent(23839, 3, 'mob23839_Kill')
RegisterUnitEvent(23839, 4, 'mob23839_Die')
